<?php

namespace App\Models;

use Illuminate\Database\Eloquent\SoftDeletes;


class Attendance extends BaseModel
{

    use SoftDeletes;


    protected $table = 'attendance';

    public function user()
    {
        return $this->belongsTo(User::class, 'name', 'name')->whereNotNull('teambition_sign');
    }

//    public function scopeUser($query)
//    {
//        return $query->join('users', function($join) {
//            $join->on('attendance.name', '=', 'users.name');
//            $join->on('attendance.attendance_no', '=', 'users.attendance_no');
//        });
//    }

}
